<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>公告发布</title>
<link href="${backPath}/images/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}

.STYLE1 {font-size: 12px}
.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;

}
a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.STYLE7 {font-size: 12}

-->
</style>
<script type="text/javascript" language="javascript">
var  highlightcolor='#E6EDF2';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

/*function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}*/
	function checkAll() {
	  for (var i = 0; i < document.getElementsByName("checkbox").length; i++) {
	   document.getElementsByName("checkbox")[i].checked = document.getElementById("selectAll").checked;
	  }
	}

   function deteleBatch(){	
	if(document.getElementsByName("checkbox").length != 0){	
		if(document.getElementById("selectAll").checked){
			if(window.confirm('确定要删除这些记录吗')){
			    var form=document.getElementById("deleteBatchForm");
				form.submit();			
			}
		}else{
      		alert("请点击［全选］");
		}
	}else{
		alert("没有任何记录可供选择!");
	}
   }
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="${backPath}/images/mail_leftbg.gif"><img src="${backPath}/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="${backPath}/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">公告发布</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="${backPath}/images/mail_rightbg.gif"><img src="${backPath}/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="${backPath}/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="${backPath}/images/list/tab_031.gif" width="15" height="30" /></td>
        <td width="951" background="${backPath}/images/list/tab_051.gif"><img src="${backPath}/images/list/311.gif" width="16" height="16" /> <span class="STYLE4">公告列表</span></td>
        <td width="281" background="${backPath}/images/list/tab_051.gif"><table border="0" align="right" cellpadding="0" cellspacing="0">
            <tr>
              <td width="60"><table width="87%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center">
                        <input type="checkbox" name="checkbox62" value="checkbox" id="selectAll" onclick="checkAll()"/>
                    </div></td>
                    <td class="STYLE1" width="50px"><div align="center">全选</div></td>
                  </tr>
              </table></td>
              <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center"><img src="${backPath}/images/list/001.gif" width="14" height="14" onclick="location.href='${backPath}/company/bulletinadd.jsp'"/></div></td>
                    <td class="STYLE1"><div align="center">              
                    新增
                    </div></td>
                  </tr>
              </table></td>
             <!--<td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center"><img src="${backPath}/images/list/114.gif" width="14" height="14" /></div></td>
                    <td class="STYLE1">
                    <div align="center">
                    <a href="bulletinedit.html">
                    修改
                    </a>
                    </div></td>
                  </tr>
              </table></td>-->
              <td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center"><img src="${backPath}/images/list/083.gif" width="14" height="14"  onclick="deteleBatch()"/></div></td>
                    <td class="STYLE1"><div align="center">删除</div></td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
        <td width="14"><img src="${backPath}/images/list/tab_071.gif" width="14" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" background="${backPath}/images/list/tab_121.gif">&nbsp;</td>
        <td bgcolor="#EEF2FB"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#9EAEB9" onMouseOver="changeto()"  onmouseout="changeback()">
          <tr>
            <td width="12%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">选择</div></td>
            <td width="44%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">公告标题</div></td>
            <td width="17%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">发布时间</div></td>
            <td width="13%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">编辑</div></td>
            <td width="14%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">删除</div></td>
          </tr>
           <form name="deleteBatchForm" id="deleteBatchForm" action="deleteBatch_Bulletin.action">
           <c:forEach items="${pager.resultList}" var="bulletin">
          <tr>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
              <input name="checkbox" type="checkbox" class="STYLE2" value="${bulletin.bulletinid}" />
            </div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${bulletin.bulletintitle}</div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center" ><a href="view_Bulletin.action?id=${bulletin.bulletinid}">${bulletin.bulletindate}</a></div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><img src="${backPath}/images/list/037.gif" width="9" height="9" /><span class="STYLE1"> [</span><a href="view_Bulletin.action?id=${bulletin.bulletinid}&&flag=true">编辑</a><span class="STYLE1">]</span></div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="${backPath}/images/list/010.gif" width="9" height="9" /> </span><span class="STYLE1">[</span><a href="delete_Bulletin.action?id=${bulletin.bulletinid}" onclick="return confirm('确定要删除吗')">删除</a><span class="STYLE1">]</span></div></td>
          </tr>
         </c:forEach>
         </form>
        </table></td>
        <td width="9" background="${backPath}/images/list/tab_161.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="29"><img src="${backPath}/images/list/tab_201.gif" width="15" height="29" /></td>
        <td background="${backPath}/images/list/tab_211.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="25%" height="29" nowrap="nowrap"><span class="STYLE1">共${pager.rowCount}条纪录，当前第${pager.pageNo}/${pager.pageCount}页，每页${pager.pageSize}条纪录</span></td>
            <td width="75%" valign="top" class="STYLE1"><div align="right">
              <table width="352" height="20" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="62" height="22" valign="middle"><div align="right"><a href="list_Bulletin.action?pageNo=${pager.firstPageNo}"><img src="${backPath}/images/list/first1.gif" width="39" height="17" /></a></div></td>
                  <td width="50" height="22" valign="middle"><div align="right"><a href="list_Bulletin.action?pageNo=${pager.prePageNo}"><img src="${backPath}/images/list/back1.gif" width="45" height="17" /></a></div></td>
                  <td width="54" height="22" valign="middle"><div align="right"><a href="list_Bulletin.action?pageNo=${pager.nextPageNo}"><img src="${backPath}/images/list/next1.gif" width="45" height="17" /></a></div></td>
                  <td width="49" height="22" valign="middle"><div align="right"><a href="list_Bulletin.action?pageNo=${pager.lastPageNo}"><img src="${backPath}/images/list/last1.gif" width="39" height="17" /></a></div></td>
                  <td width="59" height="22" valign="middle"><div align="right">转到第</div></td>
               <form action="list_Bulletin.action" method="post" name="listForm">
                  <td width="25" height="22" valign="middle"><span class="STYLE7">
                   <input  type="text" class="STYLE1" style="height:15px; width:25px;" size="5" name="pageNo"/>
                  </span></td>
                  <td width="23" height="22" valign="middle">页</td>
                  <td width="30" height="22" valign="middle"><img src="${backPath}/images/list/go1.gif" width="39" height="17" onclick="listForm.submit();"/></td>
                   </form>
          </tr>
        </table></td>
        <td width="14"><img src="${backPath}/images/list/tab_221.gif" width="14" height="29" /></td>
      </tr>
    </table></td>
  </tr>
</table></td>
    <td background="${backPath}/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    
  </tr>
</table>
</body>
</html>